# @Author: twisly
# @Date:   2021-04-12 15:52:53
# @Last Modified by:   twisly
# @Last Modified time: 2021-04-14 09:51:51

echo "nginx -t"

test_result=`nginx -t 2>&1 | grep configuration`

echo ${test_result}


if [[ ${test_result} == *"is ok"* && ${test_result} == *"is successful"* ]]; then

	echo "nginx -s reload"

	nginx -s reload
fi